1. Field of the Invention
The present invention relates to a numerical controller and a simulator and, more particularly, to a numerical controller which controls axes of two or more paths using a program for a single path, and a simulator thereof.
2. Description of the Related Art
FIG. 23 is a view showing lathe working. In lathe working, a workpiece (object to be machined) attached to a main axis is rotated, and a tool is moved in a radial direction of the workpiece and in a direction parallel to the axis of rotation to perform cutting. The tool is fixed to a support called a tool rest. A machine having a single tool rest is called a single-path (or mono-path) machine, and a machine having two or more tool rests is called a multi-path (or two-or-more-path) machine. In lathe working which does not require main axis positioning, applying the tool to the workpiece toward the axis of rotation of the workpiece from any direction provides the same machining. Controlling two or more paths and simultaneously performing machining realize high-speed machining.
Machining which is performed by controlling two or more paths as described above requires creating two or more machining programs for controlling the respective paths. Creating machining programs for issuing commands to the two or more paths takes a lot of effort. Accordingly, prior art techniques have been proposed which support the creation of machining programs for issuing commands to two or more paths such as described above.
For example, Japanese Patent Application Laid-Open No. 8-118200 discloses the following technique: a machining program for controlling two or more paths is created using indirect commands which do not specify a main axis or a tool rest, and indirect commands of the machining program for each path are converted to direct commands for a specific main axis or a specific tool rest and used when machining is performed.
Moreover, Japanese Patent Application Laid-Open No. 2011-227627 discloses the following technique: for machining steps inputted by an operator, inputs concerning paths capable of executing each machining step, orders in which machining steps can be executed, and combinations of machining steps which can be executed at the same time are accepted; and a machining program is created which satisfies the inputted conditions and which minimizes machining time.
Further, Japanese Patent Application Laid-Open No. 3-233603 discloses the following technique: in an automatic programming unit of a numerical control machine tool having two or more main axes, one program created in one coordinate series includes a machining process by two main axes and a transfer process which is automatically created based on the difference between a set workpiece reference origin position and a workpiece origin position and in which the workpiece is transferred between the two main axes, and this single program is outputted to a numerical controller for controlling the numerical control machine tool having two or more main axes.
In the case where the above-described prior art technique is used to generate a machining program for two or more paths, if interference or the like may occur between machining steps, a machining program is created such that such machining steps are not executed at the same time as machining steps which cannot be executed at the same time. However, even if a machining program for two or more paths is generated by such a method, there is a problem that the machining speed of lathe working cannot be efficiently increased.
FIG. 24 shows the movement of a tool for the case where lathe working is performed with a single path. Moreover, FIG. 25 schematically shows the order of movement of the tool in FIG. 24. In FIGS. 24 and 25, solid arrows indicate routes of cutting motions of the tool, and dotted arrows indicate routes of rapid motions of the tool. Thus, in single-path lathe working, machining is performed by sequentially executing several cutting motions based on several commands created based on the shape of a workpiece after machining. In the case where such machining is performed with two or more paths, several cutting motion commands are assigned to the paths. For example, a first machining step and a second machining step shown in FIG. 25 perform machining at positions on the workpiece which have overlapping Z-axis coordinates. Accordingly, in the case where these machining steps are assigned to different paths and where an attempt to perform the machining steps at the same time is made, when machining by the second machining step is performed at a position on the workpiece where machining by the first machining step has not been performed yet, machining of an appropriate cut depth cannot be performed, and there occur the following problems: the tool or a servo motor for driving the tool is heavily loaded, the quality of a machined surface is deteriorated, or the like. Accordingly, in the case where a machining program for controlling two or more paths is generated using a prior art technique, the first machining step and the second machining step shown in FIG. 25 are assigned to the same path, or, even when the first machining step and the second machining step shown in FIG. 25 are assigned to different paths, the second machining step is on standby not to be started until the first machining step is finished. Thus, a machining program is generated such that the first machining step and the second machining step are not performed at the same time. Similarly, almost all of the machining steps shown in FIG. 25 perform machining at positions in which Z-axis coordinates overlap each other, and a machining program is generated such that almost all of the machining steps are not performed at the same time. Accordingly, the speed of machining cannot be efficiently increased using two or more paths.